package demo2;

import java.util.Optional;

public class Student {


    private String name;
    private Integer age;
    private Double grades;
    private Card card;


    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getGrades() {
        return grades;
    }

    public void setGrades(Double grades) {
        this.grades = grades;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", grades=" + grades +
                '}';
    }

    public Student(String name, Integer age, Double grades) {
        this.name = name;
        this.age = age;
        this.grades = grades;
    }

    public Optional<Card> getCard() {
        return Optional.ofNullable(card);
    }

    public void setCard(Card card) {
        this.card = card;
    }
}
